package com.fleafinder;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

public class OpenMarketFragment extends Fragment {
	
	private Button btnOpenWebsite = null;
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.openmarketscreen, container, false);
		
		btnOpenWebsite = (Button)view.findViewById(R.id.open_buttonwebsite);
		btnOpenWebsite.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Uri uri = Uri.parse(CommonConstants.LINK_WEBSITE);
				Intent intent = new Intent(Intent.ACTION_VIEW, uri);
				startActivity(intent);				
			}
		});
		
		return view;
	}
	
}
